Method and terminal device for allocating logical channel resources

ABSTRACT

Embodiments of the present application relate to a method and a terminal device for allocating logical channel resources. The method includes: determining priority of at least one logical channel and total resources allocated to the at least one logical channel, the at least one logical channel includes a first logical channel not having function of segmenting data unit; allocating a first resource in the total resources to the first logical channel according to a priority of the first logical channel and data units carried on the first logical channel, the first resource is used to transmit n data units carried on the first logical channel, a size of the first resource is larger than or equal to a size of the n data units and smaller than or equal to a product of a PBR and a TTI of the first logical channel, and n is a positive integer.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Application No.PCT/CN2017/083257 filed on May 5, 2017, the content of which isincorporated herein by reference in its entirety.

TECHNICAL FIELD

The present application relates to the field of communications, and inparticular, to a method and a terminal device for allocating logicalchannel resources.

BACKGROUND

The LTE Radio Link Control (RLC) protocol (TS36.322) specifies thatfunctions supporting concatenation and segmentation of RLC Service DataUnits (SDU) are required for RLC Unacknowledged Mode (UM) andAcknowledged Mode (AM). The concatenation is supported for the purposethat when a transmission resource provided by Medium Access Control(MAC) is larger than a size of one RLC SDU, RLC may concatenate multipleRLC SDUs together to form an RLC Protocol Data Unit (PDU) so that theresource can be fully utilized. The segmentation of the RLC SDU issupported for the purpose that assuming that a resource provided by theMAC layer is smaller than a size of one RLC SDU or a resource providedby the MAC layer is larger than a size of one RLC SDU but cannottransmit an integer number of RLC SDUs, RLC needs to segment the RLC SDUso that the resource provided by the MAC layer is fully utilized.

For the operation of concatenating and segmenting RLC SDU, the RLCprotocol specifies that the operation of assembling RLC PDU can beinitiated only after the RLC protocol layer obtains the transmissionopportunity notified by the MAC layer, i.e., after the granted resourceshave been allocated, where the operation of assembling the RLC SDU intoan RLC PDU may include concatenation and/or segmentation.

For these two functions, they are enabled for an RLC entity by defaultunder any conditions, i.e. non-configurable. However, for some trafficthat are sensitive to the requirement of the time delay, such real-timeconcatenation and segmentation operations may cause time delay, therebyresulting in unable to meet the Quality of Service (QoS) requirementsfor the time delay traffics in these cases.

Therefore, in the discussion of standardizing the NR, the concatenationfunction has been removed from the RLC layer, for which a mainconsideration is to enable pre-processing the RLC PDU packet of the RLClayer, that is, the assembling of RLC PDUs can be initiated without theRLC layer obtaining a resource grant of the MAC layer. In this case,once the RLC layer obtains a resource grant of the MAC layer, thealready assembled RLC PDU can be sent to the MAC layer to be furtherassembled into a PDU of the MAC layer. It is worth noting that NR RLCstill maintain the segmentation operation, also for the purpose that thegranted resources of the MAC layer are more fully utilized, that is, ifthere are remaining resources, an RLC SDU can also be segmented toentirely filling the granted resources. Retaining the segmentationoperation of RLC can also introduce the time delay. For example, analready assembled RLC PDU needs to be re-segmented because it cannotentirely fill granted resources of the MAC layer. Therefore, it can beconsidered to configure the segmentation function of some logicalchannels to be disabled. However, disabling the segmentation functionmay affects the ordering process of the existing logical channelprioritization (LCP), so it is required to improve the existing methodfor allocating logical channel resource.

SUMMARY

The present application provides a method and a terminal device forallocating logical channel resources, which can effectively utilizegranted resources and rapidly process data packets of a logical channelthat a function of segmenting data units is disabled.

In a first aspect, a method for allocating logical channel resources isprovided, including: determining a priority of at least one logicalchannel and total resources allocated to the at least one logicalchannel, the at least one logical channel includes a first logicalchannel that does not have a function of segmenting a data unit;allocating a first resource in the total resources to the first logicalchannel according to a priority of the first logical channel and dataunits carried on the first logical channel, the first resource is usedto transmit n data units carried on the first logical channel, a size ofthe first resource is larger than or equal to a size of the n dataunits, and the size of the first resource is smaller than or equal to aproduct of a priority bit rate (PBR) and a transmission time interval(TTI) of the first logical channel, and n is a positive integer;transmitting the n data units by the first resource.

Therefore, method for allocating logical channel resources in anembodiment of the present application allocates resources to a logicalchannel that does not have the function of segmenting data units, andthe allocated resources are satisfied to be larger than or equal tosizes of an integer number of data units and smaller than a size ofPBR*TTI of the logical channel, thus realizing a rapid allocation ofresources to a logical channel that a function of segmenting isdisabled, and also making more efficient use of granted resources.

With reference to the first aspect, in an implementation of the firstaspect, a size of n+1 data units carried on the first logical channel islarger than the size of the first resource.

It should be understood that for a logical channel that the function ofsegmenting data units is disabled, the allocated resources satisfy thata maximum integer number of data units can be transmitted, which canmaximum utilization of the resources for transmitting data unit.

With reference to the first aspect and the above implementation thereof,in another implementation of the first aspect, the at least one logicalchannel includes a second logical channel that has the function ofsegmenting the data unit, and the method further includes: allocating asecond resource for transmitting m data units carried on the secondlogical channel in the total resources to the second logical channelaccording to a priority of the second logical channel and data unitscarried on the second logical channel, a size of the m data units isequal to a size of the second resource, and m is a positive number.

It should be understood that m being a positive number includes that mmay be a positive integer, or m may be a decimal, wherein when the m isa decimal, it indicates a ratio of segmentation for a logical channel.For example, m=2.5 indicates that the second resource transmits twocomplete data units and one half of a third data unit, that is, thethird data unit is segmented and then is transmitted.

With reference to the first aspect and the above implementationsthereof, in another implementation of the first aspect, the size of then data units is smaller than the size of the first resource, and thetransmitting the n data units by the first resource includes:transmitting, by the first resource, the n data units carried on thefirst logical channel and first padding bits, and a size of the firstpadding bits is equal to a difference between the size of the n dataunits and the size of the first resource.

It should be understood that when the first resource allocated to thefirst logical channel is larger than the size of the n data units,padding bits may be used since the logical channel cannot segment thedata units.

With reference to the first aspect and the above implementationsthereof, in another implementation of the first aspect, the priority ofthe first logical channel is larger than or equal to the priority of thesecond logical channel, the allocating a first resource in the totalresources to the first logical channel according to a priority of thefirst logical channel and data units carried on the first logicalchannel includes: allocating, at a first moment, the first resourcehaving a size equal to the size of the n data units to the first logicalchannel according to the data units carried on the first logicalchannel, and the size of the n+1 data units carried on the first logicalchannel is larger than the product of the PBR and the TTI of the firstlogical channel; and the allocating a second resource in the totalresources to the second logical channel according to a priority of thesecond logical channel and data units carried on the second logicalchannel includes: allocating, at a second moment, a second resource tothe second logical channel according to the size of the first resourceand the data units carried on the second logical channel, the secondresource is all or part resources of remaining resources except thefirst resource in the total resources, and the second moment is afterthe first moment.

In a plurality of logical channels, both the first logical channel thatdoes not have a function of segmenting a data unit and the secondlogical channel that has a function of segmenting a data unit areincluded, and when the priority of the first logical channel is largerthan or equal to the priority of the second logical channel, theremaining resources are always allocated to the first logical channel inpreference to the second logical channel, to which the remainingresources are allocated. By analogy, if the at least one logical channelincludes multiple first logical channels and multiple second logicalchannels, and the priorities of the first logical channels are largerthan or equal to the priorities of the second logical channels, similarto the above allocation scheme, it is always to preferentially allocatefor the first logical channels that does not have the function ofsegmenting data units and then to allocate for the second logicalchannels that has the function of segmenting data units.

With reference to the first aspect and the above implementationsthereof, in another implementation of the first aspect, if the priorityof the first logical channel is smaller than the priority of the secondlogical channel, allocating, at a third moment, the second resource tothe second logical channel, the size of the second resource is equal toa product of a PBR and a TTI of the second logical channel, andallocating, at a fourth moment, the first resource to the first logicalchannel, the third moment is before the fourth moment.

With reference to the first aspect and the above implementationsthereof, in another implementation of the first aspect, the allocating afirst resource in the total resources to the first logical channelaccording to a priority of the first logical channel and data unitscarried on the first logical channel includes: allocating, at the fourthmoment, the first resource having a size equal to the size of the n dataunits to the first logical channel according to the data units carriedon the first logical channel, and the size of n+1 data units carried onthe first logical channel is larger than the product of the PBR and theTTI of the first logical channel, and the first resource is all or partresources of remaining resources except the second resource in the totalresources. The method further includes: allocating, at a fifth moment, athird resource to the second logical channel, the fifth moment is afterthe fourth moment, and the third resource is all or part resources ofremaining resources except the first resource and the second resource inthe total resources.

With reference to the first aspect and the above implementationsthereof, in another implementation of the first aspect, the methodfurther includes: allocating, at a sixth moment, a fourth resource tothe first logical channel, the sixth moment is after the fifth moment,and the fourth resource is the remaining resources except the firstresource, the second resource, and the third resource in the totalresources.

With reference to the first aspect and the above implementationsthereof, in another implementation of the first aspect, the at least onelogical channel includes a third logical channel that does not have thefunction of segmenting the data unit, the priority of the first logicalchannel is equal to a priority of the third logical channel, and themethod further includes: determining a difference between the size ofthe n data units and the size of the first resource to be a size offirst padding bits, if a fifth resource having a size equal to a size ofl data units carried on the third logical channel is firstly allocatedto the third logical channel and then the first resource having a sizelarger than the size of the n data units is allocated to the firstlogical channel, and the size of the fifth resource is smaller than orequal to a product of a PBR and a TTI of the third logical channel; anddetermining a difference between the size of the l data units and thesize of the fifth resource to be a size of second padding bits, if thefirst resource having a size equal to the size of the n data units isfirstly allocated to the first logical channel and then the fifthresource having a size larger than the size of the l data units isallocated to the third logical channel.

When the size of the first padding bits is smaller than the size of thesecond padding bits, before the allocating a first resource in the totalresources to the first logical channel according to a priority of thefirst logical channel and data units carried on the first logicalchannel, the method further includes: allocating the fifth resourcehaving a size equal to the size of the l data units to the third logicalchannel, and the allocating a first resource in the total resources tothe first logical channel according to a priority of the first logicalchannel and data units carried on the first logical channel includes:allocating the first resource having a size larger than the size of then data units to the first logical channel.

When the size of the first padding bits is larger than the size of thesecond padding bits, the allocating a first resource in the totalresources to the first logical channel according to a priority of thefirst logical channel and data units carried on the first logicalchannel includes: allocating the first resource having a size equal tothe size of the n data units to the first logical channel, and after theallocating a first resource in the total resources to the first logicalchannel according to a priority of the first logical channel and dataunits carried on the first logical channel, the method further includes:allocating the fifth resource having a size larger than the size of thel data units to the third logical channel.

It should be understood that when all of the plurality of logicalchannels do not have a function of segmenting a data unit, a terminaldevice may refer to an existing ordering rule of logical channelprioritization (LCP) and allocate resources to each logical channelaccording to the priorities of the plurality of logical channels, andwhen there are two or more logical channels having a same priority amongthe plurality of logical channels, resource allocation may be performedaccording to a principle that allows padding bits to be minimum, thatis, sizes of padding bits corresponding to resource allocation performedaccording to different sequences are calculated respectively, a minimumvalue of the padding bits is determined, and resource allocation isperformed according to the corresponding resource allocation method.

In a second aspect, a terminal device is provided for performing themethod of the first aspect or of any of the possible implementations ofthe first aspect as described above. Specifically, the terminal deviceincludes units for performing the method of the first aspect or of anyof the possible implementations of the first aspect as described above.

In a third aspect, a terminal device is provided, including: a memoryand a processor, where the memory is configured to store an instruction,the processor is configured to execute instructions stored by thememory, and when the processor executes the instructions stored by thememory, the execution causes the processor to perform the method of thefirst aspect or of any of the possible implementations of the firstaspect.

In a fourth aspect, a computer readable medium is provided for storing acomputer program including instructions for performing the method of thefirst aspect or of any of the possible implementations of the firstaspect.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic diagram of segmentation and concatenationoperations in LTE according to an embodiment of the present application.

FIG. 2 is a schematic flowchart of a method 100 for allocating logicalchannel resources according to an embodiment of the present application.

FIG. 3 is a schematic diagram of allocating resources to one logicalchannel according to an embodiment of the present application.

FIG. 4 is a schematic diagram of allocating resources to two logicalchannels according to an embodiment of the present application.

FIG. 5 is another schematic diagram of allocating resources to twological channels according to an embodiment of the present application.

FIG. 6 is still another schematic diagram of allocating resources to twological channels according to an embodiment of the present application.

FIG. 7 is a schematic block diagram of a terminal device according to anembodiment of the present application.

FIG. 8 is a schematic block diagram of a terminal device according toanother embodiment of the present application.

DETAILED DESCRIPTION

The technical solutions in the embodiments of the present applicationwill be described below with reference to the accompanying drawings.

In the LTE system, when a transmission resource provided by the MAC islarger than a size of one RLC SDU, RLC may concatenate multiple RLC SDUstogether to form an RLC PDU, so that the resource can be fully utilized;when a resource provided by the MAC layer is smaller than a size of oneRLC SDU or a resource provided by the MAC layer is larger than a size ofone RLC SDU but cannot transmit an integer number of RLC SDUs, RLC needsto segment the RLC SDU so that the resource provided by the MAC layer isenabled to be fully utilized.

In addition, according to a logical channel prioritization (LCP), RadioResource Control (RRC) configures each logical channel (LC) with threeparameters: priority, priority bit rate (PBR) and bucket size duration(BSD), in the process of allocating resources to different logicalchannels. The MAC layer determines the sequence in which resources areobtained by each logical channel according to these three parameters.

Specifically, the priority determines the sequence in which the data inthe logical channel is scheduled, and the greater the priority is, thelower the priority is. The PBR determines the size of resource allocatedto each scheduled logical channel; the PBR and the BSD determine anupper limit of the resources that can be scheduled by each logicalchannel. In addition to these three parameters configured by RRC, a MACentity maintains a variable Bj for each logical channel, and the initialvalue of Bj is set to 0, which increases with the increase of theTransmission Time Interval (TTI) and increases by PBR*TTI each time withan upper limit of PRB*BSD.

The LTE MAC protocol specifies a logical channel priority process. Whena user equipment (UE) obtains an uplink resource grant, the UE allocatesthe granted resources to different logical channels according to thespecified logical channel priority process which mainly consists of thefollowing steps:

Step 1: sequencing all logical channels with Bj>0, according to thepriority, so that resources of PBR*TTI are allocated to each logicalchannel in accordance with a sequence of priority from high to low. Ifthe PBR of a certain logical channel is set to infinity by RRC,sufficient resources are allocated to the logical channel by the MACbefore other services with lower priorities are served, so that the dataof the logical channel is completely scheduled.

Step 2: updating the value of Bj by a MAC entity, and subtracting atotal size of the served Radio Link Control (RLC) protocol data unit(PDU) of the corresponding logical channel from Bj;

Step 3: sequencing all the logical channels regardless of the size of Bjaccording to the priority and scheduling them in sequence, after Step 1is performed and if there still remain granted resources. For eachlogical channel, only after data of the logical channel is completelyscheduled or all remaining granted resources are used up, the nextlogical channel is continued to be served.

It is worth noting that after the priority is determined, when resourcesare allocated to each logical channel, it is also necessary to followsome criteria specified by the protocol: if a SDU can entirely fill theallocated resources, RLC shall not segment the SDU; if a SDU needs to besegmented, the segmentation method shall satisfy that the segmented partis enabled to maximize the utilization of the allocated resources.

Specifically, FIG. 1 shows a schematic diagram of segmentation andconcatenation operations in LTE according to an embodiment of thepresent application. As shown in FIG. 1, for three RLC SDUs, i.e., RLCSDU a, RLC SDU b, and RLC SDU c, a size of resources provided by the MAClayer can transmit the entire RLC SDU a and the entire RLC SDU b, but asize of remaining resources is smaller than a size of the entire RLC SDUc. Therefore the RLC SDU c can be segmented into two segments, i.e., RLCSDU c Seg 1 and RLC SDU c Seg 2, where a size of the RLC SDU c Seg 1 isequal to a size of the remaining resources, that is, the RLC SDU a, theRLC SDU b, and the RLC SDU c Seg 1 are assembled into an RLC PDUaccording to the size of the resources provided by the MAC layer, sothat the resources provided by the MAC layer are fully utilized.Optionally, the assembled RLC PDU may further include an RLC PDU headerportion.

However, in the NR system, the concatenation function has been removedfrom the RLC layer, and the RLC layer can initiate an assembling of anRLC PDU without obtaining a resource grant of the MAC layer. In thiscase, once the RLC layer obtains a resource grant of the MAC layer, thealready assembled RLC PDU can be sent to the MAC layer to be furtherassembled into a PDU of the MAC layer.

The segmentation operation is still retained in the NR RLC, that is, ifthere are remaining resources, an RLC SDU can also be segmented toentirely fill the granted resources. Retaining the segmentationoperation of RLC can also introduce time delay. For example, an alreadyassembled RLC PDU needs to be re-segmented due to its failure toentirely fill the granted resources of the MAC layer. Therefore, it canbe considered to configure the segmentation function of some logicalchannels to be disabled. Disabling a segmentation function may affectthe existing LCP, for example, the additional padding may be introduced.Therefore, an embodiment of the present disclosure provides a method forallocating logical channel resources, which can improve the existinglogical channel resource allocation rules.

FIG. 2 shows a schematic flowchart of a method 100 for allocatinglogical channel resources according to an embodiment of the presentapplication. The method 100 can be performed by a terminal device.Specifically, the method 100 includes:

S110: determining a priority of at least one logical channel and totalresources allocated to the at least one logical channel, the at leastone logical channel includes a first logical channel that does not havea function of segmenting a data unit;

S120: allocating a first resource in the total resources to the firstlogical channel according to a priority of the first logical channel anddata units carried on the first logical channel, the first resource isused to transmit n data units carried on the first logical channel, asize of the first resource is larger than or equal to a size of the ndata units, and the size of the first resource is smaller than or equalto a product of a PBR and a III of the first logical channel, and n is apositive integer;

S130: transmitting the n data units by the first resource.

Specifically, the terminal device may determine at least one logicalchannel, and the at least one logical channel may include a firstlogical channel that does not have a function of segmenting a data unit,and may further include a second logical channel that has a function ofsegmenting a data unit. The terminal device may allocate a grantedresource to the at least one logical channel according to a priority ofthe at least one logical channel, where a first resource allocated tothe first logical channel for transmitting n data units carried on thefirst logical channel satisfies: a size of the first resource is largerthan or equal to a size of the n data units, and the size of the firstresource is smaller than or equal to the product of the PBR and the TTIof the first logical channel, where n is a positive integer, that is,the first resource is used to transmit an integer number of data unitscarried on the logical channel.

Therefore, a method for allocating logical channel resources in anembodiment of the present application allocates resources to a logicalchannel that does not have a function of segmenting a data unit, and theallocated resources are satisfied to be larger than or equal to sizes ofan integer number of data units and smaller than a size of PBR*TTI ofthe logical channel, thus realizing a rapid allocation of resources to alogical channel that a function of segmenting is disabled, and alsomaking more efficient use of granted resources.

It should be understood that the technical solutions of embodiments ofthe present application can be applied to various communication systems,such as a Global System of Mobile communication (GSM) system, a CodeDivision Multiple Access (CDMA) system, a Wideband Code DivisionMultiple Access (WCDMA) system, General Packet Radio Service (GPRS), aLTE system, a LTE Frequency Division Duplex (FDD) system, LTE TimeDivision Duplex (TDD), a Universal Mobile Telecommunication System(UMTS), or a Worldwide Interoperability for Microwave Access (WiMAX)communication system, etc.

In an embodiment of the present application, a terminal device mayinclude, but is not limited to, a mobile station (MS), a mobileterminal, a mobile telephone, a user equipment (UE), a handset and aportable equipment, a vehicle, etc. The terminal device can communicatewith one or more core networks via a Radio Access Network (RAN), forexample, the terminal device can be a mobile phone (or referred to as a“cellular” telephone), a computer with wireless communicationcapabilities, etc. The terminal device can also be portable,pocket-sized, handheld, computer-integrated or in-vehicle mobileapparatus.

In S110, determining a priority of at least one logical channel andtotal resources allocated to the at least one logical channel, the atleast one logical channel includes a first logical channel, and thefirst logical channel does not have a function of segmenting a dataunit. The at least one logical channel may further include a secondlogical channel that has a function of segmenting a data unit.

It should be understood that the first logical channel does not have afunction of segmenting a data unit, that is, the segmentation functionof the logical channel is disabled, and correspondingly, the secondlogical channel has a function of segmenting a data unit, that is, thesegmentation function of the logical channel is enabled. Enabling anddisabling the segmentation function may be non-configurable, that is,the first logical channel all disables the segmentation function bydefault under any conditions, and the second logical channel all enablesthe segmentation function by default under any conditions, butembodiments of the present application are not limited thereto.

It should be understood that the data unit may be an RLC SDU, or an RLCPDU after the RLC SDU is encapsulated, and the RLC PDU may include a PDUheader and an RLC SDU; or the data unit may be other forms of dataunits. Embodiments of the present application are not limited thereto.For convenience of description, an RLC SDU is taken as an example in thefollowing embodiments.

In S120, allocating a first resource in the total resources to the firstlogical channel according to a priority of the first logical channel anddata units carried on the first logical channel, the first resource isused to transmit n data units carried on the first logical channel, asize of the first resource is larger than or equal to a size of the ndata units, and the size of the first resource is smaller than or equalto a product of a PBR and a TTI of the first logical channel, and n is apositive integer. In S130, transmitting the n data units by the firstresource.

It should be understood that for any one logical channel of the at leastone logical channel, the logical channel may include a plurality of dataunits. For example, as shown in FIG. 1, the logical channel includesthree data units, which are respectively RLC SDU a, RLC SDU b and RLCSDU c. That is, the first logical channel may also include at least onelogical channel, and according to the priority of the first logicalchannel and data units carried on the first logical channel, a firstresource may be allocated to the first logical channel, and may transmitn data units carried on the first logical channel, where the n dataunits may be all or part of the logical channels of the first logicalchannel.

Considering resource utilization, the first resource allocated to thelogical channel should also satisfy that: a size of the n+1 data unitscarried on the first logical channel is larger than a size of the firstresource, that is, the determined value of n is a maximum value thatallows the first resource to be fully utilized.

It should be understood that when the first resource allocated to thefirst logical channel is larger than the size of the n data units, thepadding bits may be used since the logical channel cannot segment thedata units. That is to say, the n data units carried on the firstlogical channel and first padding bits are transmitted by the firstresource, a size of the first padding bits is equal to the differencebetween the size of the first resource and the size of the n data units.

In an embodiment of the present application, for the second logicalchannel that has a function of segmenting a data unit in the at leastone logical channel, the terminal device may further allocate a secondresource for transmitting m data units carried on the second logicalchannel in the total resources to the second logical channel accordingto the priority of the second logical channel and the data unit carriedon the second logical channel, a size of the m data units is equal to asize of the second resource, and m is a positive number.

It should be understood that m being a positive number includes that mmay be a positive integer, or m may be a decimal, wherein when the m isa decimal, it indicates a ratio of segmentation for a logical channel.For example, m=2.5 indicates that the second resource transmits twocomplete data units and one half of a third data unit, that is, thethird data unit is segmented and then is transmitted.

In an embodiment of the present application, since the at least onelogical channel includes a first logical channel that does not have afunction of segmenting a data unit, and further may include a secondlogical channel that has a function of segmenting a data unit,therefore, when the resource is allocated to the at least one logicalchannel, the allocation may be performed according to a priority of theat least one logical channel and a size of data units carried on eachlogical channel.

Optionally, as an embodiment, when the at least one logical channel onlyincludes one logical channel that does not have a function of segmentinga data unit, the terminal device allocates all granted resources to thelogical channel, and the resource may transmit a maximum integer numberof data units carried on the logical channel. Since the logical channelcannot segment a data unit, for remaining resources, they can be filledby the padding bits.

For example, FIG. 3 shows a schematic diagram of allocating resources toone logical channel according to an embodiment of the presentapplication. Specifically, the terminal device allocates resources tothe first logical channel that does not have a function of segmenting adata unit. As shown in FIG. 3, the first logical channel may berepresented as LCH a, and the LCH a may include multiple data units. Forexample, in FIG. 3, the LCH a including three data units is taken as anexample, which are respectively represented as LCH SDU 1, LCH SDU 2, andLCH SDU 3.

Since only one logical channel LCH a is included, granted resources ofthe terminal device are all used to transmit data carried on the LCH a,and it is assumed that the granted resource allocated by the terminaldevice is equal to the value of PBR*TTI of the LCH a, that is, the sizeof the first resource allocated to the first logical channel is equal toPBR*TTI of the first logical channel, and a size of PBR*TTI is as shownin FIG. 3, that is to say, the size of the first resource is larger thanthe sum of the sizes of the LCH SDU 1 and the LCH SDU 2, and the size ofthe first resource is smaller than the sum of sizes of the three dataunits of the LCH SDU 1, the LCH SDU 2, and the LCH SDU 3.

Therefore, the first resource can be used to transmit at most the twodata units LCH SDU 1 and LCH SDU 2 carried on the first logical channelLCH a, and remaining part of resources are filled by the padding bitssince the first logical channel does not have a function of segmenting adata unit.

Optionally, as an embodiment, the at least one logical channel may be aplurality of logical channels which all do not have logical channel thathas a function of segmenting a data unit, and the terminal device mayrefer to an existing LCP rule and allocate resources to each logicalchannel according to the priorities of the plurality of logicalchannels, and when there are two or more logical channels having a samepriority among the plurality of logical channels, resource allocationmay be performed according to a principle that allows padding bits to beminimum, that is, sizes of padding bits corresponding to resourceallocation performed according to different sequences are calculatedrespectively, a minimum value of the padding bits is determined, andresource allocation is performed according to the corresponding resourceallocation method.

Here taking two logical channels that do not have a function ofsegmenting a data unit as an example, the at least one logical channelincludes a first logical channel and a third logical channel, neitherthe first logical channel nor the third logical channel can segment adata unit, and a priority of the first logical channel is equal to apriority of the third logical channel. Specifically, FIG. 4 shows aschematic diagram of allocating resources to two logical channelsaccording to an embodiment of the present application, where the firstlogical channel is represented as LCH a, and the third logical channelis represented as LCH b, and the priority of LCH a and the priority ofLCH b are equal. Both LCH a and LCH b may include a plurality of dataunits. Here taking both LCH a and LCH b including three data units as anexample for illustration, as shown in FIG. 4, the three data unitsincluded in LCH a and LCH b are respectively represented as LCH SDU 1,LCH SDU 2, and LCH SDU 3.

When the terminal device allocates the granted resources to LCH a andLCH b, since the priority of LCH a and priority of LCH b are equal,therefore, it may respectively calculate a size of first padding bitsneeded when resources are firstly allocated to LCH a and then allocatedto the LCH b and a size of second padding bits needed when resources arefirstly allocated to LCH b and then allocated to LCH a. By comparing thesize of the first padding bits and the size of the second padding bits,resources are allocated according to the allocation scheme correspondingto less padding bits.

It is assumed here that values of PBR*TTI of LCH a and LCH b arerespectively as shown in FIG. 4, that is, both of the values of PBR*TTIof LCH a and LCH b are satisfied to be larger than a size of two dataunits and smaller than a size of three data units. The terminal devicecalculates the size of the first padding bits needed when resources arefirstly allocated to LCH a and then allocated to LCH b. Since neitherLCH a nor LCH b has a function of segmenting a data unit, the resourcesfirstly allocated to LCH a may be smaller than or equal to a size ofPBR*TTI of the LCH a. According to the size of PBR*TTI of LCH a, thesize of the resources allocated to LCH a is equal to the size of twodata units, and then the remaining resources are allocated to LCH b.Assuming that the remaining resources are larger than the sum of sizesof two data units LCH SDU 1 and LCH SDU 2 in LCH b and smaller than thesum of sizes of three data units LCH SDU 1, LCH SDU 2 and LCH SDU 3, theremaining resources can be used to transmit the two data units LCH SDU 1and LCH SDU 2 of LCH b, and the rest is filled by the first paddingbits, thus the size of the first padding bits are determined. Similarly,the terminal device can also calculate the size of the second paddingbits needed when resources are firstly allocated to LCH b and thenallocated to LCH a.

The size of the first padding bits is compared to the size of the secondpadding bits. If the first padding bits are smaller than the secondpadding bits, resources are firstly allocated to LCH a, and thenallocated to LCH b; if the second padding bits are smaller than thefirst padding bits, resources are firstly allocated to LCH b and thenallocated to LCH a.

Optionally, as an embodiment, when at least one logical channel to whichresources are allocated by the terminal device includes both a logicalchannel that has a function of segmenting a data unit and a logicalchannel that does not have function of segmenting a data unit, resourcescan be allocated to logical channels according to the priority. Thefollowing is an example in which the at least one logical channelincludes two logical channels, which are a first logical channel thatdoes not have the function of segmenting a data unit and a secondlogical channel that has the function of segmenting a data unit.

Optionally, as an embodiment, when a priority of the first logicalchannel is larger than or equal to a priority of the second logicalchannel, resources are preferentially allocated to the first logicalchannel, and then resources are allocated to the second logical channel.Specifically, FIG. 5 shows another schematic diagram of allocatingresources to two logical channels according to an embodiment of thepresent application, where the first logical channel is represented asLCH a, the second logical channel is represented as LCH b, and apriority of LCH a and a priority of LCH b are equal, or a priority ofLCH a is larger than a priority of LCH b. Both LCH a and LCH b mayinclude a plurality of data units. Here taking both LCH a and LCH bincluding three data units as an example for illustration, as shown inFIG. 5, the three data units included in LCH a and LCH b arerespectively represented as LCH SDU 1, LCH SDU 2, and LCH SDU 3.

When allocating granted resources to LCH a and LCH b, the terminaldevice preferentially allocates resources to the first logical channelLCH a and then to the second logical channel LCH b. Specifically, a sizeof a first resource allocated to LCH a satisfied to be: smaller than orequal to PBR*TTI of LCH a and equal to a size of a maximum integernumber of data units. As shown in FIG. 5, since the value of PBR*TTI ofLCH a is larger than the sum of sizes of the two data units LCH SDU 1and LCH SDU 2, and is smaller than the sum of sizes of the three dataunits LCH SDU 1, LCH SDU 2, and LCH SDU 3, thus the size of the firstresource allocated to LCH a is equal to the sum of the sizes of LCH SDU1 and LCH SDU 2.

After allocating the first resource to the first logical channel LCH a,then the terminal device allocates the remaining resources except thefirst resource in the total resources to the second logical channel LCHb. Since LCH b has a segmentation function, therefore a size of a secondresource that can be allocated to LCH b is equal to the value of PBR*TTIof LCH b. If the remaining resources are smaller than PBR*TTI, all theremaining resources are allocated to LCH b. For the second resourceallocated to LCH b, assuming that a size of the second resource is equalto the PBR*TTI, and as shown in FIG. 5, the PBR*TTI is larger than thesum of sizes of the two data units LCH SDU 1 and LCH SDU 2 in the LCH band smaller than the sum of sizes of the three data units LCH SDU 1, LCHSDU 2 and LCH SDU 3, since LCH b has a segmentation function, thereforedata units of LCH b can be segmented according to a size of PBR*TTI.That is to say, the second resource transmits LCH SDU 1, LCH SDU 2 andsegmented portion LCH SDU 3 Seg of LCH SDU 3 carried on LCH b.Similarly, when the second resource is smaller than the PBR*TTI,segmentation can also be performed on LCH b according to the size of thesecond resource.

By analogy, if the at least one logical channel includes multiple firstlogical channels and multiple second logical channels, and thepriorities of the first logical channels are larger than or equal to thepriorities of the second logical channels, similar to the aboveallocation scheme, it is always to preferentially allocate for the firstlogical channels that does not have the function of segmenting a dataunit and then to allocate for the second logical channels that has thefunction of segmenting a data unit.

Optionally, as an embodiment, when a priority of a first logical channelis smaller than a priority of a second logical channel, resources areallocated firstly to the second logical channel and then to the firstlogical channel according to the priority sequence. Specifically, FIG. 6shows still another schematic diagram of allocating resources to twological channels according to an embodiment of the present application,where the first logical channel is represented as LCH a, and the secondlogical channel is represented as LCH b, and a priority of LCH a issmaller than a priority of LCH b. Both LCH a and LCH b may include aplurality of data units. Here taking both LCH a and LCH b includingthree data units as an example for illustration, as shown in FIG. 6, thethree data units included in LCH a and LCH b are respectivelyrepresented as LCH SDU I, LCH SDU 2, and LCH SDU 3.

When allocating granted resources to LCH a and LCH b, the terminaldevice preferentially allocates resources to the second logical channelLCH b and then to the first logical channel LCH a. Specifically, sinceLCH b has a segmentation function, the second resource may be allocatedto LCH b according to the size of PBR*TTI, that is, the size of thesecond resource is equal to the size of PBR*TTI. As shown in FIG. 6,assuming that PBR*TTI of LCH b is larger than the sum of sizes of thetwo data units LCH SDU 1 and LCH SDU 2 in LCH b, and is smaller than thesum of sizes of the three data units LCH SDU 1, LCH SDU 2 and LCH SDU 3,then data units of LCH b are segmented according to a size of thePBR*TTI. That is to say, the second resource transmits LCH SDU 1, LCHSDU 2 and a segmented portion LCH SDU 3 Seg of the LCH SDU 3 carried onLCH b.

After the terminal device allocates the second resource to the secondlogical channel LCH b, then the remaining resources except the secondresource in the total resource are allocated to the first logicalchannel LCH a. If a size of the remaining resource is smaller than orequal to the size of PBR*TTI of LCH a, then a size of the first resourceallocated to LCH a is equal to a maximum integer number of data unitscarried on LCH a, and the size of the maximum integer number of dataunits carried on LCH a is smaller than or equal to the remainingresources; if the size of the remaining resource is larger than the sizeof the PBR*TTI of LCH a, then the size of the first resource allocatedto LCH a is equal to a maximum integer number of data units carried onLCH a, and the size of the maximum integer number of data units carriedon LCH a is smaller than or equal to the size of the PBR*TTI of LCH a.

For example, as shown in FIG. 6, assuming that the size of the remainingresources except the second resource in the total resources is equal totwo data units carried on LCH a, or larger than two data units carriedon LCH a and smaller than three data units carried on LCH a, then thefirst resource allocated to LCH a is used to transmit two data units LCHSDU 1 and LCH SDU 2 carried on LCH a.

If there are still remaining resources in the total resources after thesecond resource and the first resource are allocated according to theabove procedure, then the resources are continued to be allocated to LCHb. Specifically, as shown in FIG. 6, assuming that there still existremaining resources in the total resources except the second resourceand the first resource, then a third resource is continued to beallocated to LCH b. If the remaining resources are smaller than a sizeof data units that are included in LCH b and are not transmitted, then asize of the third resource is equal to a size of the remainingresources, that is, data units of LCH b can be segmented according tothe size of the remaining resources so that the remaining resources arefully utilized; if the remaining resources are large enough and cantransmit all data units that are included in LCH b and are nottransmitted, that is, there still exists remaining resources in theremaining resources after the third resource for transmitting all dataunits carried on LCH b is allocated to the LCH b, then a fourth resourcecan be continued to be allocated to LCH a.

When the terminal device allocates the fourth resource to LCH a, if thefourth resource can transmit an integer number of data units carried onLCH a, a maximum integer number of data units are transmitted accordingto a size of the fourth resource; if there still exist remainingresources after the integer number of data units is transmitted and theremaining resources are insufficient to transmit other data unitscarried on the LCH a, it can be filled by the padding bits, butembodiments of the present application are not limited thereto.

It should be understood that, in embodiments of the present application,the location of a MAC subheader is not limited. That is to say, thelocation and size of the MAC subheader may change according to thediscussion of standardization, and embodiments of the presentapplication are not limited thereto.

Therefore, the method for allocating logical channel resources providedin embodiments of the present application, according to priority oflogical channel, can allocate the resources to a logical channel thatdoes not have a function of segmenting a data unit, and the allocatedresources satisfies to be larger than or equal to sizes of an integernumber of data units and smaller than the size of PBR*TTI of the logicalchannel, and it is also possible to allocate resources to a logicalchannel that has a function of segmenting a data unit, thus realizing arapid allocation of resources to a logical channel that a function ofsegmenting is disabled, and improving the efficiency of resourceallocation while ensuring more efficient use of granted resources.

It should be understood that, in various embodiments of the presentapplication, sizes of serial numbers of each of the processes describedabove do not mean an order of execution, and the order of execution ofeach of process should be determined by its function and internal logic,and should not constitutes any limitation to the implementation processof embodiments of the present application.

The method for allocating logical channel resources according toembodiments of the present application is described in detail above withreference to FIG. 1 to FIG. 6. The terminal device according toembodiments of the present application will be described below withreference to FIG. 7 to FIG. 8.

As shown in FIG. 7, a terminal device 200 according to an embodiment ofthe present application includes:

-   -   a determining module 210 configured to determine a priority of        at least one logical channel and total resources allocated to        the at least one logical channel, the at least one logical        channel includes a first logical channel that does not have a        function of segmenting a data unit;    -   an allocating module 220 configured to allocate a first resource        in the total resources to the first logical channel according to        a priority of the first logical channel and data units carried        on the first logical channel, the first resource is used to        transmit n data units carried on the first logical channel, a        size of the first resource is larger than or equal to a size of        the n data units, and the size of the first resource is smaller        than or equal to a product of a priority bit rate (PBR) and a        transmission time interval (TTI) of the first logical channel,        and n is a positive integer;    -   a transmitting module 230 configured to transmit the n data        units by the first resource.

Therefore, the terminal device provided in an embodiment of the presentapplication allocates resources to a logical channel that does not havea function of segmenting a data unit, and the allocated resources aresatisfied to be larger than or equal to sizes of an integer number ofdata units and smaller than a size of PBR*TTI of the logical channel,thus realizing a rapid allocation of resources to a logical channel thata function of segmenting is disabled, and also making more efficient useof granted resources.

Optionally, as an embodiment, a size of n+1 data units carried on thefirst logical channel is larger than the size of the first resource.

Optionally, as an embodiment, the at least one logical channel includesa second logical channel, the second logical channel has a function ofsegmenting a data unit, and the allocating module 220 is furtherconfigured to: allocate a second resource for transmitting m data unitscarried on the second logical channel in the total resources to thesecond logical channel according to a priority of the second logicalchannel and data units carried on the second logical channel, a size ofthe m data units is equal to a size of the second resource, and m is apositive number.

Optionally, as an embodiment, the size of the n data units is smallerthan the size of the first resource, and the transmitting module 230 isconfigured to: transmit, by the first resource, the n data units carriedon the first logical channel and first padding bits, a size of the firstpadding bits is equal to the difference between the size of the n dataunits and the size of the first resource.

Optionally, as an embodiment, the priority of the first logical channelis larger than or equal to the priority of the second logical channel,and the allocating module 220 is specifically configured to: allocate,at a first moment, the first resource having a size equal to a size ofthe n data units to the first logical channel according to data unitscarried on the first logical channel, and the size of n+1 data unitscarried on the first logical channel is larger than the product of a PBRand a TTI of the first logical channel; and allocate, at a secondmoment, a second resource to the second logical channel according to thesize of the first resource and the data units carried on the secondlogical channel, the second resource is all or part resources ofremaining resources except the first resource in the total resource, andthe second moment is after the first moment.

Optionally, as an embodiment, if the priority of the first logicalchannel is smaller than the priority of the second logical channel, thesecond resource is allocated to the second logical channel at a thirdmoment, the size of the second resource is equal to a product of a PBRand a TTI of the second logical channel, and the first resource isallocated to the first logical channel at a fourth moment, the thirdmoment is before the fourth moment.

Optionally, as an embodiment, the allocating module 220 is configuredto: allocate, at the fourth moment, the first resource having a sizeequal to a size of the n data units to the first logical channelaccording to data units carried on the first logical channel, and thesize of n+1 data units carried on the first logical channel is largerthan the product of the PBR and the TTI of the first logical channel,the first resource is all or part resources of remaining resourcesexcept the second resource in the total resources; allocate, at a fifthmoment, a third resource to the second logical channel, the fifth momentis after the fourth moment, the third resource is all or part resourcesof remaining resources except the first resource and the second resourcein the total resources.

Optionally, as an embodiment, the allocating module 220 is specificallyconfigured to: allocate, at a sixth moment, a fourth resource to thefirst logical channel, the sixth moment is after the fifth moment, thefourth resource is the remaining resources except the first resource,the second resource, and the third resource in the total resources.

Optionally, as an embodiment, the at least one logical channel includesa third logical channel that does not have a function of segmenting adata unit, a priority of the first logical channel is equal to apriority of the third logical channel, and the determining module 210 isspecifically configured to: determine a difference between the size ofthe n data units and the size of the first resource to be a size offirst padding bits, if a fifth resource having a size equal to a size ofl data units carried on the third logical channel is firstly allocatedto the third logical channel and then the first resource having a sizelarger than the size of the n data units is allocated to the firstlogical channel, the size of the fifth resource is smaller than or equalto a product of PBR and TTI of the third logical channel; and determinea difference between the size of the l data units and the size of thefifth resource to be a size of second padding bits, if the firstresource having a size equal to the size of the n data units is firstlyallocated to the first logical channel and then the fifth resourcehaving a size larger than the size of the l data units is allocated tothe third logical channel; the allocating module 220 is specificallyconfigured to: firstly allocate the fifth resource having a size equalto the size of the l data units to the third logical channel and thenallocate the first resource having a size larger than the size of the ndata units to the first logical channel, when the size of the firstpadding bits is smaller than the size of the second padding bits;firstly allocate the first resource having a size equal to the size ofthe n data units to the first logical channel and then allocate thefifth resource having a size larger than the size of the l data units tothe third logical channel, when the size of the first padding bits islarger than the size of the second padding bits.

It should be understood that the terminal device 200 according toembodiments of the present application may correspondingly perform themethod 100 in embodiments of the present application, and the abovedescribed and other operations and/or functions of the respectivemodules in the terminal device 200 are respectively for implementing thecorresponding processes of the terminal devices in the respectivemethods in FIG. 1 to FIG. 6, which are not described herein for brevity.

Therefore, the terminal device in embodiments of the present applicationmay, according to priorities of logical channels, allocate resources toa logical channel that does not have a function of segmenting a dataunit, and the allocated resources are satisfied to be larger than orequal to sizes of an integer number of data units and smaller than asize of PBR*TTI of the logical channel, and also allocate resources to alogical channel having a function of segmenting a data unit, thusrealizing a rapid allocation of resources to a logical channel that afunction of segmenting is disabled, and improving the efficiency ofresource allocation while ensuring more efficient use of grantedresources.

FIG. 8 shows a schematic block diagram of a terminal device 300according to an embodiment of the present application. As shown in FIG.8, the terminal device 300 includes a processor 310 and a transceiver320. The processor 310 is connected to the transceiver 320. Optionally,the terminal device 300 further includes a memory 330 which is connectedto the processor 310. Wherein, the processor 310, the memory 330, andthe transceiver 320 communicate with each other through an internalconnection path, transmit control and/or data signals. The memory 330can be used to store instructions, and the processor 310 is used toexecute instructions stored in the memory 330 for controlling thetransceiver 320 to transmit information or a signal, and the processor310 is configured to: determine a priority of at least one logicalchannel and total resources allocated to the at least one logicalchannel, the at least one logical channel includes a first logicalchannel that does not have a function of segmenting a data unit;allocate a first resource in the total resources to the first logicalchannel according to a priority of the first logical channel and dataunits carried on the first logical channel, the first resource is usedto transmit n data units carried on the first logical channel, a size ofthe first resource is larger than or equal to a size of the n dataunits, and the size of the first resource is smaller than or equal to aproduct of a priority bit rate (PBR) and a transmission time interval(TTI) of the first logical channel, and n is a positive integer; thetransceiver 320 is configured to transmit the n data units by the firstresource.

Therefore, the terminal device in embodiments of the present applicationallocates resources to a logical channel that does not have a functionof segmenting a data unit, and the allocated resources are satisfied tobe larger than or equal to sizes of an integer number of data units andsmaller than a size of PBR*TTI of the logical channel, thus realizing arapid allocation of resources to a logical channel that a function ofsegmenting is disabled, and also making more efficient use of grantedresources.

Optionally, as an embodiment, a size of n+1 data units carried on thefirst logical channel is larger than the size of the first resource.

Optionally, as an embodiment, the at least one logical channel includesa second logical channel, the second logical channel has a function ofsegmenting a data unit, and the processor 310 is configured to: allocatea second resource for transmitting m data units carried on the secondlogical channel in the total resources to the second logical channelaccording to a priority of the second logical channel and data unitscarried on the second logical channel, a size of the m data units isequal to a size of the second resource, and m is a positive number.

Optionally, as an embodiment, the size of the n data units is smallerthan a size of the first resource, and the transceiver 320 is configuredto: transmit, by the first resource, the n data units carried on thefirst logical channel and first padding bits, a size of the firstpadding bits is equal to a difference between the size of the n dataunits and the size of the first resource.

Optionally, as an embodiment, the priority of the first logical channelis larger than or equal to the priority of the second logical channel,and the processor 310 is configured to: allocate, at a first moment, thefirst resource having a size equal to a size of the n data units to thefirst logical channel, according to the data carried on the firstlogical channel, and the size of n+1 data units carried on the firstlogical channel is larger than the product of a PBR and a TTI of thefirst logical channel; and allocate, at a second moment, a secondresource to the second logical channel, according to the size of thefirst resource and the data units carried on the second logical channel,the second resource is all or part resources of remaining resourcesexcept the first resource in the total resources, and the second momentis after the first moment.

Optionally, as an embodiment, if the priority of the first logicalchannel is smaller than the priority of the second logical channel, thesecond resource is allocated to the second logical channel at a thirdmoment, the size of the second resource is equal to a product of a PBRand a TTI of the second logical channel, and the first resource isallocated to the first logical channel at a fourth moment, the thirdmoment is before the fourth moment.

Optionally, as an embodiment, the processor 310 is configured to:allocate, at the fourth moment, the first resource having a size equalto a size of the n data units to the first logical channel according todata units carried on the first logical channel, and the size of n+1data units carried on the first logical channel is larger than theproduct of a PBR and a TTI of the first logical channel, the firstresource is all or part resources of remaining resources except thesecond resource in the total resources; and allocate, at a fifth moment,a third resource to the second logical channel, the fifth moment isafter the fourth moment, the third resource is all or part resources ofremaining resources except the first resource and the second resource inthe total resources.

Optionally, as an embodiment, the processor 310 is configured to:allocate, at a sixth moment, a fourth resource to the first logicalchannel, the sixth moment is after the fifth moment, the fourth resourceis the remaining resources except the first resource, the secondresource, and the third resource in the total resources.

Optionally, as an embodiment, the at least one logical channel includesa third logical channel that does not have a function of segmenting adata unit, a priority of the first logical channel is equal to apriority of the third logical channel, and the processor 310 isconfigured to: determine a difference between the size of the n dataunits and the size of the first resource to be a size of first paddingbits, if a fifth resource having a size equal to a size of l data unitscarried on the third logical channel is firstly allocated to the thirdlogical channel and then the first resource having a size larger than asize of the n data units is allocated to the first logical channel, thesize of the fifth resource is smaller than or equal to a product of aPBR and a TTI of the third logical channel; and determine a differencebetween the size of the l data units and the size of the fifth resourceto be a size of second padding bits, if the first resource having a sizeequal to the size of the n data units is firstly allocated to the firstlogical channel and then the fifth resource having a size larger than asize of the l data units is allocated to the third logical channel; theprocessor 310 is configured to: firstly allocate the fifth resourcehaving a size equal to the size of the l data units to the third logicalchannel and then allocate the first resource having a size larger thanthe size of the n data units to the first logical channel, when the sizeof the first padding bits is smaller than the size of the second paddingbits; firstly allocate the first resource having a size equal to a sizeof the n data units to the first logical channel and then allocate thefifth resource having a size larger than the size of the l data units tothe third logical channel, when the size of the first padding bits islarger than the size of the second padding bits.

It should be understood that the terminal device 300 according toembodiments of the present application may correspond to the terminaldevice 200 in embodiments of the present application, and may correspondto the corresponding subject performing the method 100 according toembodiments of the present application, and the above described andother operations and/or functions of the respective units in theterminal device 300 are respectively for implementing the correspondingprocesses of the terminal device in the respective methods in FIG. 1 toFIG. 6, which are not described herein for brevity.

Therefore, the terminal device in embodiments of the present applicationmay, according to priorities of logical channels, allocate resources toa logical channel that does not have a function of segmenting a dataunit, and the allocated resources are satisfied to be larger than orequal to sizes of an integer number of data units and smaller than asize of PBR*TTI of the logical channel, and also allocate resources to alogical channel having a function of segmenting a data unit, thusrealizing a rapid allocation of resources to a logical channel that afunction of segmenting is disabled, and improving the efficiency ofresource allocation while ensuring more efficient use of grantedresources.

It should be noted that embodiments of the above method of the presentapplication may be applied to a processor or implemented by a processor.The processor may be an integrated circuit chip with signal processingcapabilities. In the implementation process, each step of the aboveembodiments of the method may be completed by an integrated logiccircuit of hardware in a processor or by an instruction in a form ofsoftware. The above processor may be a general-purpose processor, adigital signal processor (DSP), an application specific integratedcircuit (ASIC), a Field Programmable Gate Array (FPGA) or otherprogrammable logic devices, discrete gates or transistor logic devices,and discrete hardware components, and can implement or execute themethods, steps, and logic blocks disclosed in embodiments of the presentapplication. A general-purpose processor may be a microprocessor or theprocessor may be any conventional processor or the like. The steps incombination with the method disclosed in the embodiments of the presentapplication may be directly implemented as being completed throughperformed by a hardware decoding processor, or being completed throughperformed by a combination of hardware and software modules in adecoding processor. The software modules can be located in aconventional storage medium in the prior art such as random accessmemory, flash memory, read only memory, programmable read only memory orelectrically erasable programmable memory, registers, and the like. Thestorage medium is located in the memory, and the processor reads theinformation in the memory and combines its hardware to complete thesteps of the above method.

It is understood that the memory in the embodiments of the presentapplication may be a volatile memory or a non-volatile memory, or mayinclude both volatile memory and non-volatile memory. The non-volatilememory may be a read-only memory (ROM), a programmable read only memory(PROM), an erasable programmable read only memory (Erasable PROM,EPROM), or an electrically erasable programmable read only memory(EEPROM) or flash memory. The volatile memory can be a Random AccessMemory (RAM) that acts as an external cache. By way of examples, but notas limitations, many forms of RAM are available, such as static randomaccess memory (SRAM), dynamic random access memory (DRAM), SynchronousDRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced SynchronousDynamic Random Access Memory (ESDRAM), Synchronous-Link Dynamic RandomAccess Memory (SLDRAM) and Direct Rambus RAM (DR RAM). It should benoted that the memories of the systems and methods described herein areintended to including, without being limited to, these and any othersuitable types of memories.

Persons of ordinary skill in the art will appreciate that elements andalgorithm steps of various examples described with reference to theembodiments disclosed herein can be implemented in electronic hardwareor a combination of computer software and electronic hardware. Whetherthese functions are performed in hardware or software depends on thespecific application and design constraints of the solution. A personskilled in the art can use different methods for implementing thedescribed functions for each particular application, but suchimplementation should not be considered to go beyond the scope of thepresent application.

A person skilled in the art can clearly understand that for theconvenience and brevity of the description, the specific working processof the system, the device and the unit described above can refer to thecorresponding process in the above embodiments of the method, anddetails are not described herein.

In the several embodiments provided by the present application, itshould be understood that the disclosed systems, devices, and methodsmay be implemented in other manners. For example, embodiments of theapparatus described above are merely illustrative. For example, thedivision of the unit is only a division in logical functions. In actualimplementation, there may be another division manner, and for example,multiple units or components may be combined or can be integrated intoanother system, or some features can be ignored or not executed. Inaddition, the coupling or direct coupling or communication connectiontherebetween shown or discussed herein may be an indirect coupling orcommunication connection through some interface, device or unit, and maybe electrical, mechanical or otherwise.

The units described as separate components may or may not be physicallyseparated, and the components displayed as units may or may not bephysical units, that is, may be located in one place, or may bedistributed to multiple network units. Some or all of the units may beselected according to actual needs to achieve the purpose of thesolution of the embodiment.

In addition, each of functional units in each of embodiments of thepresent application may be integrated into one processing unit, or eachunit may exist physically separately, or two or more units may beintegrated into one unit.

The functions may be stored in a computer readable storage medium ifimplemented in the form of a software functional unit and sold or usedas a standalone product. Based on such understanding, the technicalsolution of the present application substantially or the part makingcontributions relative to the prior art or part of the technicalsolution, may be embodied in the form of a software product, wherein thecomputer software product is stored in a storage medium and includessome instructions to cause a computer device (which may be a personalcomputer, server, or network device, etc.) to perform all or part of thesteps of the methods described in various embodiments of the presentapplication. The foregoing storage medium includes various mediums whichcan store program codes: a U disk, a mobile hard disk, a read-onlymemory (ROM), a random access memory (RAM), a magnetic disk, or anoptical disk, and the like.

The above description are only specific implementations of the presentapplication, but the protection scope of the present application is notlimited thereto, and any person skilled in the art can easily think ofchanges or substitutions within the technical scope disclosed in thepresent application, which should be covered by the protection scope ofthis application. Therefore, the protection scope of the presentapplication should be defined by the protection scope of the claims.

What is claimed is:
 1. A method for allocating logical channelresources, comprising: determining a priority of at least one logicalchannel and total resources allocated to the at least one logicalchannel, the at least one logical channel comprises a first logicalchannel that does not have a function of segmenting a data unit;allocating a first resource in the total resources to the first logicalchannel according to a priority of the first logical channel and dataunits carried on the first logical channel, the first resource is usedto transmit n data units carried on the first logical channel, a size ofthe first resource is larger than or equal to a size of the n data unitsand the size of the first resource is smaller than or equal to a productof a priority bit rate (PBR) and a transmission time interval (TTI) ofthe first logical channel, and n is a positive integer; and transmittingthe n data units by the first resource; wherein the at least one logicalchannel comprises a second logical channel that has the function ofsegmenting the data unit, the method further comprising: allocating asecond resource for transmitting m data units carried on the secondlogical channel in the total resources to the second logical channelaccording to a priority of the second logical channel and data unitscarried on the second logical channel, a size of the m data units isequal to a size of the second resource, and m is a positive number;wherein if the priority of the first logical channel is smaller than thepriority of the second logical channel, allocating, at a third moment,the second resource to the second logical channel, the size of thesecond resource is equal to a product of a PBR and a TTI of the secondlogical channel, and allocating, at a fourth moment, the first resourceto the first logical channel, the third moment is before the fourthmoment.
 2. The method according to claim 1, wherein a size of n+1 dataunits carried on the first logical channel is larger than the size ofthe first resource.
 3. The method according to claim 1, wherein the sizeof the n data units is smaller than the size of the first resource, andthe transmitting the n data units by the first resource comprises:transmitting, by the first resource, the n data units carried on thefirst logical channel and first padding bits, and a size of the firstpadding bits is equal to a difference between the size of the n dataunits and the size of the first resource.
 4. The method according toclaim 1, wherein the priority of the first logical channel is largerthan or equal to the priority of the second logical channel, theallocating a first resource in the total resources to the first logicalchannel according to a priority of the first logical channel and dataunits carried on the first logical channel comprises: allocating, at afirst moment, the first resource having a size equal to the size of then data units to the first logical channel according to the data unitscarried on the first logical channel, and the size of the n+1 data unitscarried on the first logical channel is larger than the product of thePBR and the III of the first logical channel; the allocating a secondresource in the total resources to the second logical channel accordingto a priority of the second logical channel and data units carried onthe second logical channel comprises: allocating, at a second moment, asecond resource to the second logical channel according to the size ofthe first resource and the data units carried on the second logicalchannel, the second resource is all or part resources of remainingresources except the first resource in the total resources, and thesecond moment is after the first moment.
 5. The method according toclaim 1, wherein the allocating a first resource in the total resourcesto the first logical channel according to a priority of the firstlogical channel and data units carried on the first logical channelcomprises: allocating, at the fourth moment, the first resource having asize equal to the size of the n data units to the first logical channelaccording to the data units carried on the first logical channel, andthe size of n+1 data units carried on the first logical channel islarger than the product of the PBR and the TTI of the first logicalchannel, and the first resource is all or part resources of remainingresources except the second resource in the total resources; the methodfurther comprises: allocating, at a fifth moment, a third resource tothe second logical channel, the fifth moment is after the fourth moment,and the third resource is all or part resources of remaining resourcesexcept the first resource and the second resource in the totalresources.
 6. The method according to claim 5, wherein the methodfurther comprises: allocating, at a sixth moment, a fourth resource tothe first logical channel, the sixth moment is after the fifth moment,and the fourth resource is remaining resources except the firstresource, the second resource, and the third resource in the totalresources.
 7. The method according to claim 1, wherein the at least onelogical channel comprises a third logical channel that does not have thefunction of segmenting the data unit, the priority of the first logicalchannel is equal to a priority of the third logical channel, and themethod further comprises: determining a difference between the size ofthe n data units and the size of the first resource to be a size offirst padding bits, if a fifth resource having a size equal to a size ofl data units carried on the third logical channel is firstly allocatedto the third logical channel and then the first resource having a sizelarger than the size of the n data units is allocated to the firstlogical channel, and the size of the fifth resource is smaller than orequal to a product of a PBR and a TTI of the third logical channel; anddetermining a difference between the size of the l data units and thesize of the fifth resource to be a size of second padding bits, if thefirst resource having a size equal to the size of the n data units isfirstly allocated to the first logical channel and then the fifthresource having a size larger than the size of the l data units isallocated to the third logical channel; and when the size of the firstpadding bits is smaller than the size of the second padding bits, beforethe allocating a first resource in the total resources to the firstlogical channel according to a priority of the first logical channel anddata units carried on the first logical channel, the method furthercomprises: allocating the fifth resource having a size equal to the sizeof the l data units to the third logical channel; and the allocating afirst resource in the total resources to the first logical channelaccording to a priority of the first logical channel and data unitscarried on the first logical channel comprises: allocating the firstresource having a size larger than the size of the n data units to thefirst logical channel; when the size of the first padding bits is largerthan the size of the second padding bits, the allocating a firstresource in the total resources to the first logical channel accordingto a priority of the first logical channel and data units carried on thefirst logical channel comprises: allocating the first resource having asize equal to the size of the n data units to the first logical channel,and after the allocating a first resource in the total resources to thefirst logical channel according to a priority of the first logicalchannel and data units carried on the first logical channel, the methodfurther comprises: allocating the fifth resource having a size largerthan the size of the l data units to the third logical channel.
 8. Aterminal device, comprising a processor and a memory storinginstructions thereon, the processor when executing the instructions,being configured to: determine a priority of at least one logicalchannel and total resources allocated to the at least one logicalchannel, the at least one logical channel comprises a first logicalchannel that does not have a function of segmenting a data unit;allocate a first resource in the total resources to the first logicalchannel according to a priority of the first logical channel and dataunits carried on the first logical channel, the first resource is usedto transmit n data units carried on the first logical channel, a size ofthe first resource is larger than or equal to a size of the n data unitsand the size of the first resource is smaller than or equal to a productof a priority bit rate (PBR) and a transmission time interval (TTI) ofthe first logical channel, and n is a positive integer; and transmit then data units by the first resource; wherein the at least one logicalchannel comprises a second logical channel that has the function ofsegmenting the data unit, and the processor is further configured to:allocate a second resource for transmitting m data units carried on thesecond logical channel in the total resources to the second logicalchannel according to a priority of the second logical channel and dataunits carried on the second logical channel, a size of the m data unitsis equal to a size of the second resource, and m is a positive number;wherein if the priority of the first logical channel is smaller than thepriority of the second logical channel, allocating, at a third moment,the second resource to the second logical channel, the size of thesecond resource is equal to a product of a PBR and a TTI of the secondlogical channel, and allocating, at a fourth moment, the first resourceto the first logical channel, the third moment is before the fourthmoment.
 9. The terminal device according to claim 8, wherein a size ofn+1 data units carried on the first logical channel is larger than thesize of the first resource.
 10. The terminal device according to claim8, wherein the size of the n data units is smaller than the size of thefirst resource, and the processor is further configured to: transmit, bythe first resource, the n data units carried on the first logicalchannel and first padding bits, and a size of the first padding bits isequal to a difference between the size of the n data units and the sizeof the first resource.
 11. The terminal device according to claim 8,wherein the priority of the first logical channel is larger than orequal to the priority of the second logical channel, and the processoris further configured to: allocate, at a first moment, the firstresource having a size equal to the size of the n data units to thefirst logical channel according to the data units carried on the firstlogical channel, and the size of the n+1 data units carried on the firstlogical channel is larger than the product of the PBR and the III of thefirst logical channel; and allocate, at a second moment, a secondresource to the second logical channel according to the size of thefirst resource and the data units carried on the second logical channel,the second resource is all or part resources of remaining resourcesexcept the first resource in the total resources, and the second momentis after the first moment.
 12. The terminal device according to claim 8,wherein the processor is further configured to: allocate, at the fourthmoment, the first resource having a size equal to the size of the n dataunits to the first logical channel according to the data units carriedon the first logical channel, and the size of n+1 data units carried onthe first logical channel is larger than the product of the PBR and theTTI of the first logical channel, and the first resource is all or partresources of remaining resources except the second resource in the totalresources; allocate, at a fifth moment, a third resource to the secondlogical channel, the fifth moment is after the fourth moment, and thethird resource is all or part resources of remaining resources exceptthe first resource and the second resource in the total resources. 13.The terminal device according to claim 12, wherein the processor isfurther configured to: allocate, at a sixth moment, a fourth resource tothe first logical channel, the sixth moment is after the fifth moment,and the fourth resource is remaining resources except the firstresource, the second resource, and the third resource in the totalresources.
 14. The terminal device according to claim 8, wherein the atleast one logical channel comprises a third logical channel that doesnot have the function of segmenting the data unit, the priority of thefirst logical channel is equal to a priority of the third logicalchannel, and the processor is further configured to: determine adifference between the size of the n data units and the size of thefirst resource to be a size of first padding bits, if a fifth resourcehaving a size equal to a size of l data units carried on the thirdlogical channel is firstly allocated to the third logical channel andthen the first resource having a size larger than the size of the n dataunits is allocated to the first logical channel, and the size of thefifth resource is smaller than or equal to a product of a PBR and a TTIof the third logical channel; and determine a difference between thesize of the l data units and the size of the fifth resource to be a sizeof second padding bits, if the first resource having a size equal to thesize of the n data units is firstly allocated to the first logicalchannel and then the fifth resource having a size larger than the sizeof the l data units is allocated to the third logical channel; and theprocessor is further configured to: firstly allocate the fifth resourcehaving a size equal to the size of the l data units to the third logicalchannel and then allocate the first resource having a size larger thanthe size of the n data units to the first logical channel, when the sizeof the first padding bits is smaller than the size of the second paddingbits; and firstly allocate the first resource having a size equal to thesize of the n data units to the first logical channel and then allocatethe fifth resource having a size larger than the size of the l dataunits to the third logical channel, when the size of the first paddingbits is larger than the size of the second padding bits.